﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.components {
    import flash.display.*;
    import net.wooga.pets.constants.*;

    public class ElementDisplay extends Sprite {

        private var _asset:MovieClip;
        private var _isBackground:Boolean;
        private var _depth:int;// = 0

        public function get asset():MovieClip{
            return (this._asset);
        }
        public function set asset(_arg1:MovieClip):void{
            this._asset = _arg1;
            addChild(this._asset);
            this.draggable = false;
        }
        public function set draggable(_arg1:Boolean):void{
            useHandCursor = (buttonMode = (mouseEnabled = _arg1));
            this.activateArea(GameConstants.GRAB_AREA, _arg1);
            this.activateArea(GameConstants.SNAP_AREA, _arg1);
        }
        public function get depth():int{
            return (this._depth);
        }
        public function set depth(_arg1:int):void{
            this._depth = _arg1;
        }
        public function get isBackground():Boolean{
            return (this._isBackground);
        }
        public function set isBackground(_arg1:Boolean):void{
            this._isBackground = _arg1;
        }
        private function activateArea(_arg1:String, _arg2:Boolean):void{
            var _local3:DisplayObject;
            if (this._asset){
                _local3 = this._asset.getChildByName(_arg1);
            };
            if (_local3){
                _local3.alpha = 0;
                _local3.visible = _arg2;
            };
        }

    }
}//package net.wooga.pets.views.components 
